Conventional photocopiers have utilized a variety of marker editing features. These marker editing features allow a user to specify an area of the document with a color marker for special processing. In these systems, the photocopier detects an area enclosed by a marker and applies image processing steps to the pixels within the enclosed area specified by the user. These image processing steps could be, for example, deleting the image inside the color marker, changing the color of the image inside the color marker, highlighting the area inside the color marker, inserting graphical material or text within the color marker, or utilizing different image recognition processes upon the text within the color markers, using the color marker as a boundary for the processes. Although the conventional devices utilize a marker editing feature, most conventional devices require a prescanning of the document to detect the enclosed area or color marker.
Marker editing can be accomplished in several steps. First, the color markers from the document are detected by analyzing pixels which represent the scanned image. In other words, the pixels representing a color marker are determined. Each non-marker pixel is then classified as either belonging to an interior or an exterior of the marker curve. For the interior pixels, the image can remain unchanged, or user specified color conversion or other image processing steps can be performed thereon. For the exterior pixels, the image can remain unchanged, or user specified color conversion or other image processing steps can be performed thereon.
For the marker pixel itself, the image data associated with the marker pixel is replaced by a predetermined background value to erase the color marker from the output image.
To detect the color marker pixels, for example, the RGB values of each pixel of the document being scanned can be analyzed directly. However, a preferred approach is to convert RGB image data into hue, chroma (saturation) and lightness (intensity) (L*C*h) data. By comparing the chroma value of a pixel against a minimum chroma value to determine that the pixel is a color pixel and the hue angle of the pixel against a window surrounding a known marker hue value hm, the color marker pixels can be readily identified.
FIG. 1 illustrates a polar coordinate diagram showing the boundary parameters of a possible target color. More specifically, if the chroma and hue values of the pixel fall within the shaded area of the polar coordinate diagram, the pixel is determined to be a marker pixel. If the chroma and hue values of the pixel fall outside the shaded area of FIG. 1, the pixel is determined to be a non-marker pixel.
It is noted that the hue window limits are h.sub.min =h.sub.m - dh and h.sub.max =h.sub.m + dh wherein dh is a half window. It is noted that the known hue marker value h.sub.m is the center value of the hue window such that the hue window is created by adding a half window d.sub.h to either side of the center hue value h.sub.m. Hue windows are defined in the range from 0.degree. to 360.degree.. Moreover, the hue value of the pixel is normalized prior to this analysis such that if the hue value of the pixel is less than 0.degree., the normalized hue value of the pixel becomes equal to h.sub.m +360.degree., and if the hue value of the pixel is greater than or equal to 360.degree., the normalized hue value of the pixel becomes equal to h.sub.m -360.degree.. This normalization process is repeated until the normalized hue value of the pixel is within the range of 0.degree. to 360.degree..
FIG. 2 illustrates a method for the detection of a color marker. At step S1, the chroma value of the pixel is compared with the minimum chroma value C*.sub.min to determine if the chroma value is greater than the minimum chroma value C*.sub.min. If the chroma value of the pixel is not greater than the minimum chroma value C*.sub.min, the method determines that the pixel does not represent a color marker. However, if step S1 determines that the chroma value for the pixel is greater than the minimum chroma value C*.sub.min, step S2 determines whether h.sub.max is greater than h.sub.min for the hue window of the color marker.
Step S2 takes into account a case where the hue window straddles the 0.degree. line. In other words, if h.sub.min is greater than h.sub.max, the hue window is straddling the 0.degree. line. If step S2 determines that the hue window is straddling the 0.degree. line, step S4 further analyzes the hue value for the pixel to determine whether the pixel is a marker pixel. Step S4 determines whether the hue value for the pixel is less than h.sub.max or the hue value for the pixel is greater than h.sub.min. If step S4 makes a positive determination, the pixel is determined to be a marker pixel. However, if step S4 makes a negative determination, the pixel is determined to be a non-marker pixel, not a color marker.
If the hue window does not straddle the 0.degree. line, step S3 makes a determination of whether the hue value of the pixel is within the hue window. More specifically, step S3 determines whether the hue value of the pixel is greater than h.sub.min and less than h.sub.max. If step S3 makes a positive determination, the pixel is determined to be a color marker pixel. However, if step S3 makes a negative determination, the pixel is determined to be a non-marker pixel, not a color marker pixel.
Since several markers of distinct colors can be used to mark a document, the hue of each pixel has to be checked against each marker's hue window. The result of this analysis and classification for the "j" pixel and the "i" scanline are stored in an integer array with the value set to zero for a non-marker pixel and 1 to "n" for a pixel representing one of the "n" marker colors. Once the marker pixels are identified, the pixels that are inside the marker or markers need to be identified. Techniques such as region growing and crossing counts can be used to determine which pixels are inside the marker or markers.
Region growing determines which region a pixel belongs by examining its immediate neighbors in the current and previous scanline. Region growing can be utilized to analyze a convex shaped enclosed area. This process can also work for a general shape in a two pass marker editing system with the sorting and merging of different regions being done between the two passes.
The border crossing count technique is also well known in computer graphics for raster scan conversion of a filled polygon. A horizontal line is drawn to the left from the pixel and the number of crossings along the line with the polygon edges are counted, excluding the crossings of a horizontal edge or a vertex that is a local minimum or maximum in the vertical coordinate. If the number of crossings is odd, the pixel is determined to be inside the enclosed marker area. On the other hand, if the number of crossings is even, the pixel is determined to be outside of the enclosed marker area.
One problem with utilizing this approach is that a typical marker trace is considerably wider than a pixel and a fairly large window is needed to discern the up and down characteristics of the marker border. A typical marker could be as large as 1mm thick. This would correspond to 16 pixels at a resolution of 400 spi (spots per inch). In order to effectively utilize a cross counting approach, a thinning step of the marker trace is required. Conventional methods for thinning use repeated applications of a logic operation upon a stored bit map to obtain the skeleton of the marker trace. This technique requires the prescanning of the document in conventional copiers.
Various aspects of marker editing systems are discussed briefly below.
U.S. Pat. No. 5,041,919 to Yamamoto et al., issued Aug. 20, 1991, discloses an image processing apparatus which utilizes a marker editing system to identify the area on a document for separate image processing. In this device, Yamamoto et al. disclose that two separate scannings of the document are required to identify the area outlined by the marker.
U.S. Pat. No. 5,142,355 to Fujima, issued Aug. 25, 1992, discloses a marker editing system for use in an image processing apparatus. More specifically, Fujima discloses that prior to the main scanning of the document, a marker scan or a closed area scan is performed. This way, marker image or closed frame image data can be preliminarily stored in a plane memory prior to the copying or image processing of a main scanning operation.
U.S. Pat. No. 5,140,440 to Sasaki, issued Aug. 18, 1992, discloses a method for detecting an enclosed area on a document for an image forming apparatus. This device requires two separate scannings to determine the image data in the marked area. More specifically, Sasaki discloses the utilization of two separate documents to enable the marker editing function. In this device, a first document containing the image information representative of the image printed on the document is scanned by the device. Then, a second document having positional information representative of the marked area of the image to be processed is scanned by the image forming apparatus. Upon scanning the two separate documents having different types of data, Sasaki discloses that the area for specific image processing can be detected and processed.
U.S. Pat. No. 5,136,399 to Aoyama, issued Aug. 4, 1992, discloses an image forming apparatus having a marker editing function using only a single scan. In this device, Aoyama discloses that the image is initially scanned by a copier to place the image digitally into a memory. The scanned image is then displayed on a screen for editing by the operator. According to Aoyama, the operator can utilize a light pen to mark the areas on the screen which require separate or special image processing. In this apparatus, the marker data is not inputted through the scanning of the original document.
U.S. Pat. No. 4,987,497 to Yoshimura, issued Jan. 22, 1991, discloses another image editing method for a digital copier wherein the marker for the document can be detected utilizing a single scan of the copier. More specifically, Yoshimura discloses a marker editing system which utilizes an inside erase mode and a paint-out erase mode. To distinguish between the two modes, Yoshimura discloses that the actual thickness of the marker scanned in by the digital copier is analyzed wherein a thicker marker represents the paint-out erase mode, while a thinner marker represents an inside erase mode.
U.S. Pat. No. 5,216,498 to Matsunawa et al., issued Jun. 1, 1993, discloses another image processing apparatus capable of detecting marked regions. Matsunawa et al. disclose an editing system capable of detecting marked regions utilizing a single scan of the marked document on the basis of the color data formed by a color data-forming circuit such that the region enclosed by the marker is extracted.
There is a need to provide a marker editing process which is capable of being implemented during the single pass of the document. More specifically, the marker editing process needs to be carried out, in realtime, during the actual photocopying process. The two scanning requirement to implement a marker editing function retards any increase or improvements realized in speed realized by other components in a copier system. Therefore, it is desirable that the marker editing function be carried out during the single pass of the document to enable a true increase in the processing speed of the photocopier system. Also, there is a need to provide a marker editing process which is capable of being implemented during the single pass of the document that does not place additional burdens upon the operator to be overly precise when marking a region. In other words, the marker editing system must be able to overcome common deficiencies in the operator's marking process, while maintaining the necessary speed to enable processing of the information during the real scan time of a document.